<template>
  <div class="item">
    <div class="content">
      <span>{{ info.name }}&nbsp;&nbsp;&nbsp;{{ info.mobile }}</span
      ><br />
      <span class="address"
        ><span class="tag" v-show="info.is_fault === 2">默认</span
        >{{ info.addressDetail }}</span
      >
    </div>
    <div class="edit" @click.stop="goPage()">
      <i class="iconfont iconbianji"></i>
    </div>
  </div>
</template>

<script>
export default {
  name: "addressItem",
  props: {
    info: {
      type: Object
    }
  },
  methods: {
    goPage() {
      sessionStorage.setItem("address", JSON.stringify(this.info));
      this.$commonJs.goPage("personEditAddress", this.info.id);
    }
  }
};
</script>

<style scoped lang="stylus">
.item{
  flex_content();
  background white
  padding 20px 24px
  font-size:24px;
  font-family:PingFang-SC-Regular;
  font-weight:400;
  color:rgba(51,51,51,1);
  line-height:43px;
  border-bottom 1px solid #D6D6D6
  .content{
    flex_one();
    .tag{
      background:rgba(49,126,185,1);
      border-radius:8px;
      font-size:20px;
      font-family:PingFang-SC-Regular;
      font-weight:400;
      color:rgba(255,255,255,1);
      padding 4px 11px
      margin-right 11px
    }
    .address{
      font-size:22px;
    }
  }
  .edit{
    width 100px
    text-align right
    align-self flex-end
  }
}
</style>
